package com.your.company.demo.service.persist.v1_0_0;

import com.strato.annotation.osgi.v1_0_0.service.OsgiService;
import com.strato.orm.mybatis.v1_0_0.annotation.MybatisWired;
import com.your.company.demo.dao.mybatis.v1_0_0.dao.mapper.HelloNamesMapper;
import com.your.company.demo.dao.mybatis.v1_0_0.model.HelloNames;
import com.your.company.demo.service.api.v1_0_0.HelloService;

@OsgiService(id="persist")
public class PersistHelloService implements HelloService {

	@MybatisWired(datasource="common")
	private HelloNamesMapper mapper;
	
	@Override
	public String getFullName(String shortName) {
		HelloNames names=mapper.selectByPrimaryKey(shortName);
		if(names==null){
			return "NoName";
		}
		return names.getFullName();
	}

}
